﻿using System.Collections.Generic;
using System.Drawing;
using System.Threading.Tasks;

namespace GTAFingerprinterCore.Core
{
    public interface IFingerprinter
    {
        /// <summary>
        /// 正确指纹字典 Key：大指纹  Value：大指纹对应的4个小指纹
        /// </summary>
        Dictionary<Image, List<Image>> BigAndSubsDic { get; set; }

        /// <summary>
        /// 从截图裁剪大指纹
        /// </summary>
        /// <param name="image">截图</param>
        /// <returns>大指纹图</returns>
        Task<Image> CutBig(Image image, BigOption option);

        /// <summary>
        /// 从截图裁剪小指纹
        /// </summary>
        /// <param name="image">截图</param>
        /// <returns>小指纹图数组，8个元素</returns>
        Task<List<Image>> CutSubs(Image image, SubsOption option);

        /// <summary>
        /// 识别
        /// </summary>
        /// <param name="big">大图</param>
        /// <param name="subs">小图</param>
        /// <param name="similarity">相似度阈值</param>
        /// <returns>正确的小图索引</returns>
        Task<List<int>> Recognize(Image big, IEnumerable<Image> subs, float similarity);

        /// <summary>
        /// 自动按键
        /// </summary>
        /// <param name="corrects">正确的索引值</param>
        /// <param name="delay">按键延时</param>
        /// <returns></returns>
        Task AutoPressKeys(IEnumerable<int> corrects, int delay);

        /// <summary>
        /// 截取游戏截图
        /// </summary>
        /// <returns></returns>
        Task<Image> CaptureGameWindow(bool isFullScreen);
    }
}